package com.ruoyi.household.service.impl;

import java.util.List;

import com.ruoyi.system.api.domain.ResidentialQuarters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.household.mapper.ResidentialQuartersMapper;
import com.ruoyi.household.service.IResidentialQuartersService;

/**
 * 小区CRUDService业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-01
 */
@Service
public class ResidentialQuartersServiceImpl implements IResidentialQuartersService 
{
    @Autowired
    private ResidentialQuartersMapper residentialQuartersMapper;

    @Override
    public ResidentialQuarters selectResidentialQuartersByName(String rQName) {
        return residentialQuartersMapper.selectResidentialQuartersByName(rQName);
    }

    /**
     * 查询小区CRUD
     * 
     * @param id 小区CRUD主键
     * @return 小区CRUD
     */
    @Override
    public ResidentialQuarters selectResidentialQuartersById(Long id)
    {
        return residentialQuartersMapper.selectResidentialQuartersById(id);
    }

    /**
     * 查询小区CRUD列表
     * 
     * @param residentialQuarters 小区CRUD
     * @return 小区CRUD
     */
    @Override
    public List<ResidentialQuarters> selectResidentialQuartersList(ResidentialQuarters residentialQuarters)
    {
        return residentialQuartersMapper.selectResidentialQuartersList(residentialQuarters);
    }

    /**
     * 新增小区CRUD
     * 
     * @param residentialQuarters 小区CRUD
     * @return 结果
     */
    @Override
    public int insertResidentialQuarters(ResidentialQuarters residentialQuarters)
    {
        return residentialQuartersMapper.insertResidentialQuarters(residentialQuarters);
    }

    /**
     * 修改小区CRUD
     * 
     * @param residentialQuarters 小区CRUD
     * @return 结果
     */
    @Override
    public int updateResidentialQuarters(ResidentialQuarters residentialQuarters)
    {
        return residentialQuartersMapper.updateResidentialQuarters(residentialQuarters);
    }

    /**
     * 批量删除小区CRUD
     * 
     * @param ids 需要删除的小区CRUD主键
     * @return 结果
     */
    @Override
    public int deleteResidentialQuartersByIds(Long[] ids)
    {
        return residentialQuartersMapper.deleteResidentialQuartersByIds(ids);
    }

    /**
     * 删除小区CRUD信息
     * 
     * @param id 小区CRUD主键
     * @return 结果
     */
    @Override
    public int deleteResidentialQuartersById(Long id)
    {
        return residentialQuartersMapper.deleteResidentialQuartersById(id);
    }
}
